package com.xunyin.modules.balance.service;

import com.xunyin.common.service.BaseService;
import com.xunyin.modules.balance.domain.MtBalance;
import com.xunyin.modules.balance.service.dto.BalanceDto;
import com.xunyin.modules.balance.service.dto.TBalanceQueryCriteria;
import com.xunyin.pagination.PaginationRequest;
import com.xunyin.pagination.PaginationResponse;
import com.xunyin.web.ResponseObject;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * 余额业务接口
 * <p>
 * Created by xunyinyunshang <3594419785@qq.com>
 * CopyRight 讯音云商 https://www.tonetn.com
 */
public interface MtBalanceService extends BaseService<MtBalance> {


    /**
     * 查询数据分页
     *
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String, Object>
     */
    Map<String, Object> queryAll(TBalanceQueryCriteria criteria, Pageable pageable);

    /**
     * 查询所有数据不分页
     *
     * @param criteria 条件参数
     * @return List<TDevice>
     */
    List<MtBalance> queryAll(TBalanceQueryCriteria criteria);

    /**
     * 分页查询余额列表
     *
     * @param paginationRequest
     * @return
     */
    PaginationResponse<BalanceDto> queryBalanceListByPagination(PaginationRequest paginationRequest);

    /**
     * 添加余额记录
     *
     * @param reqDto
     */
    boolean addBalance(MtBalance reqDto);

    /**
     * 获取订单余额记录
     *
     * @param orderSn
     * @return
     */
    List<MtBalance> getBalanceListByOrderSn(String orderSn);

    ResponseObject getMyBalanceList(Map<String, Object> paramMap);
}
